#!/bin/bash

assert-equal () {
    diff -q <("${ANGELIX_RUN:-eval}" $1) <(echo -ne "$2") > /dev/null
}

case "$1" in
    1)
        assert-equal "./test 1 0 100" '0'
        ;;
    2)
        assert-equal "./test 1 11 110" '1'
        ;;
    3)
        assert-equal "./test 0 100 50" '1'
        ;;
    4)
        assert-equal "./test 1 -20 60" '1'
        ;;
    5)
        assert-equal "./test 0 0 10" '0'
        ;;
esac
